3.15.58 \(\int (a c+(b c+a d) x+b d x^2)^2 \, dx\)

Optimal. Leaf size=65 \[ -\frac {b (c+d x)^4 (b c-a d)}{2 d^3}+\frac {(c+d x)^3 (b c-a d)^2}{3 d^3}+\frac {b^2 (c+d x)^5}{5 d^3} \]

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {610, 43} \begin {gather*} -\frac {b (c+d x)^4 (b c-a d)}{2 d^3}+\frac {(c+d x)^3 (b c-a d)^2}{3 d^3}+\frac {b^2 (c+d x)^5}{5 d^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*c + (b*c + a*d)*x + b*d*x^2)^2,x]

[Out]

((b*c - a*d)^2*(c + d*x)^3)/(3*d^3) - (b*(b*c - a*d)*(c + d*x)^4)/(2*d^3) + (b^2*(c + d*x)^5)/(5*d^3)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 610

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[1/c^p, Int[Simp[
b/2 - q/2 + c*x, x]^p*Simp[b/2 + q/2 + c*x, x]^p, x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && IGt
Q[p, 0] && PerfectSquareQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \left (a c+(b c+a d) x+b d x^2\right )^2 \, dx &=\frac {\int (b c+b d x)^2 (a d+b d x)^2 \, dx}{b^2 d^2}\\ &=\frac {\int \left ((b c-a d)^2 (b c+b d x)^2-2 (b c-a d) (b c+b d x)^3+(b c+b d x)^4\right ) \, dx}{b^2 d^2}\\ &=\frac {(b c-a d)^2 (c+d x)^3}{3 d^3}-\frac {b (b c-a d) (c+d x)^4}{2 d^3}+\frac {b^2 (c+d x)^5}{5 d^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 79, normalized size = 1.22 \begin {gather*} \frac {1}{3} x^3 \left (a^2 d^2+4 a b c d+b^2 c^2\right )+a^2 c^2 x+\frac {1}{2} b d x^4 (a d+b c)+a c x^2 (a d+b c)+\frac {1}{5} b^2 d^2 x^5 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*c + (b*c + a*d)*x + b*d*x^2)^2,x]

[Out]

a^2*c^2*x + a*c*(b*c + a*d)*x^2 + ((b^2*c^2 + 4*a*b*c*d + a^2*d^2)*x^3)/3 + (b*d*(b*c + a*d)*x^4)/2 + (b^2*d^2
*x^5)/5

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a c+(b c+a d) x+b d x^2\right )^2 \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a*c + (b*c + a*d)*x + b*d*x^2)^2,x]

[Out]

IntegrateAlgebraic[(a*c + (b*c + a*d)*x + b*d*x^2)^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.36, size = 89, normalized size = 1.37 \begin {gather*} \frac {1}{5} x^{5} d^{2} b^{2} + \frac {1}{2} x^{4} d c b^{2} + \frac {1}{2} x^{4} d^{2} b a + \frac {1}{3} x^{3} c^{2} b^{2} + \frac {4}{3} x^{3} d c b a + \frac {1}{3} x^{3} d^{2} a^{2} + x^{2} c^{2} b a + x^{2} d c a^{2} + x c^{2} a^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*c+(a*d+b*c)*x+b*d*x^2)^2,x, algorithm="fricas")

[Out]

1/5*x^5*d^2*b^2 + 1/2*x^4*d*c*b^2 + 1/2*x^4*d^2*b*a + 1/3*x^3*c^2*b^2 + 4/3*x^3*d*c*b*a + 1/3*x^3*d^2*a^2 + x^
2*c^2*b*a + x^2*d*c*a^2 + x*c^2*a^2

________________________________________________________________________________________

giac [A]  time = 0.15, size = 89, normalized size = 1.37 \begin {gather*} \frac {1}{5} \, b^{2} d^{2} x^{5} + \frac {1}{2} \, b^{2} c d x^{4} + \frac {1}{2} \, a b d^{2} x^{4} + \frac {1}{3} \, b^{2} c^{2} x^{3} + \frac {4}{3} \, a b c d x^{3} + \frac {1}{3} \, a^{2} d^{2} x^{3} + a b c^{2} x^{2} + a^{2} c d x^{2} + a^{2} c^{2} x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*c+(a*d+b*c)*x+b*d*x^2)^2,x, algorithm="giac")

[Out]

1/5*b^2*d^2*x^5 + 1/2*b^2*c*d*x^4 + 1/2*a*b*d^2*x^4 + 1/3*b^2*c^2*x^3 + 4/3*a*b*c*d*x^3 + 1/3*a^2*d^2*x^3 + a*
b*c^2*x^2 + a^2*c*d*x^2 + a^2*c^2*x

________________________________________________________________________________________

maple [A]  time = 0.05, size = 69, normalized size = 1.06 \begin {gather*} \frac {b^{2} d^{2} x^{5}}{5}+\frac {\left (a d +b c \right ) b d \,x^{4}}{2}+a^{2} c^{2} x +\left (a d +b c \right ) a c \,x^{2}+\frac {\left (2 a b c d +\left (a d +b c \right )^{2}\right ) x^{3}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*c+(a*d+b*c)*x+b*d*x^2)^2,x)

[Out]

1/5*b^2*d^2*x^5+1/2*(a*d+b*c)*b*d*x^4+1/3*(2*a*b*c*d+(a*d+b*c)^2)*x^3+a*c*(a*d+b*c)*x^2+a^2*c^2*x

________________________________________________________________________________________

maxima [A]  time = 0.99, size = 72, normalized size = 1.11 \begin {gather*} \frac {1}{5} \, b^{2} d^{2} x^{5} + \frac {1}{2} \, {\left (b c + a d\right )} b d x^{4} + a^{2} c^{2} x + \frac {1}{3} \, {\left (b c + a d\right )}^{2} x^{3} + \frac {1}{3} \, {\left (2 \, b d x^{3} + 3 \, {\left (b c + a d\right )} x^{2}\right )} a c \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*c+(a*d+b*c)*x+b*d*x^2)^2,x, algorithm="maxima")

[Out]

1/5*b^2*d^2*x^5 + 1/2*(b*c + a*d)*b*d*x^4 + a^2*c^2*x + 1/3*(b*c + a*d)^2*x^3 + 1/3*(2*b*d*x^3 + 3*(b*c + a*d)
*x^2)*a*c

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 74, normalized size = 1.14 \begin {gather*} x^3\,\left (\frac {a^2\,d^2}{3}+\frac {4\,a\,b\,c\,d}{3}+\frac {b^2\,c^2}{3}\right )+a^2\,c^2\,x+\frac {b^2\,d^2\,x^5}{5}+a\,c\,x^2\,\left (a\,d+b\,c\right )+\frac {b\,d\,x^4\,\left (a\,d+b\,c\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*c + x*(a*d + b*c) + b*d*x^2)^2,x)

[Out]

x^3*((a^2*d^2)/3 + (b^2*c^2)/3 + (4*a*b*c*d)/3) + a^2*c^2*x + (b^2*d^2*x^5)/5 + a*c*x^2*(a*d + b*c) + (b*d*x^4
*(a*d + b*c))/2

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 87, normalized size = 1.34 \begin {gather*} a^{2} c^{2} x + \frac {b^{2} d^{2} x^{5}}{5} + x^{4} \left (\frac {a b d^{2}}{2} + \frac {b^{2} c d}{2}\right ) + x^{3} \left (\frac {a^{2} d^{2}}{3} + \frac {4 a b c d}{3} + \frac {b^{2} c^{2}}{3}\right ) + x^{2} \left (a^{2} c d + a b c^{2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*c+(a*d+b*c)*x+b*d*x**2)**2,x)

[Out]

a**2*c**2*x + b**2*d**2*x**5/5 + x**4*(a*b*d**2/2 + b**2*c*d/2) + x**3*(a**2*d**2/3 + 4*a*b*c*d/3 + b**2*c**2/
3) + x**2*(a**2*c*d + a*b*c**2)

________________________________________________________________________________________